from django.urls import re_path
from rest_framework.routers import DefaultRouter
from . import views

#
# urlpatterns = [
#     # 吐槽和评论
#     re_path(r'^spit/$', views.release.as_view()),
#     re_path(r'^spit/?P<id>[0-9]+/$', views.SpitInfo.as_view()),
#     re_path(r'^spit/?P<id>[0-9]+/updatethumbup$', views.Fabulous.as_view()),
#     re_path('spit/({id})/children/$', views.SpitChildren.as_view()),
#     re_path('spit/(?P<id>[0-9]+)/collect/$', views.Spitcollect.as_view()),
# ]

# router = DefaultRouter()
#
# router.register('spit', views.release, base_name='search')
#
# urlpatterns += router.urls



from django.urls import re_path
from rest_framework_jwt.views import obtain_jwt_token

from . import views

urlpatterns = [
    re_path('spit/$', views.Spitcollect.as_view()),
    re_path('spit/(?P<id>\d+)/updatethumbup/$', views.SpitupdatethumbupView.as_view()),
    re_path('spit/(?P<pk>[0-9]+)/collect/$', views.SpitcollectView.as_view()),
    re_path('spit/(?P<pk>[0-9]+)/$', views.SpitInfoView.as_view()),
    re_path('spit/(?P<pk>\w+)/children/$', views.CommentListAPIView.as_view()),
]

